{$CLEO}

0000: 
thread 'HEL'



REPEAT 
WAIT 0
IF 0AAB: file_exists "CLEO\KEYS.INI"
THEN
    if and                                                                                    
    0AF0: 3@  "CLEO\KEYS.INI" "TANK_DRIVER" "CAMERA_MODE"                                        
    0AF0: 15@ "CLEO\KEYS.INI" "TANK_DRIVER" "STOP_TANK"
    0AF0: 19@ "CLEO\KEYS.INI" "TANK_DRIVER" "FIRE_MINIGUN"
    0AF0: 29@ "CLEO\KEYS.INI" "TANK_DRIVER" "DRIVE_TO_MARKER"
    0AF0: 21@ "CLEO\KEYS.INI" "TANK_DRIVER" "EXIT_TURRET"                                                               
    then break                                                                                
    else                                                                                      
        0AF1: write_int 54 to_ini_file "CLEO\KEYS.INI" "TANK_DRIVER" "CAMERA_MODE"         
        0AF1: write_int 55 to_ini_file "CLEO\KEYS.INI" "TANK_DRIVER" "STOP_TANK"           
        0AF1: write_int 56 to_ini_file "CLEO\KEYS.INI" "TANK_DRIVER" "FIRE_MINIGUN"
        0AF1: write_int 57 to_ini_file "CLEO\KEYS.INI" "TANK_DRIVER" "DRIVE_TO_MARKER"
        0AF1: write_int 53 to_ini_file "CLEO\KEYS.INI" "TANK_DRIVER" "EXIT_TURRET"                               
    end                                                                                       
END 
UNTIL IF 0AAB: file_exists "CLEO\KEYS.INI"




const
  _random_1 = 28@
  _random_2 = 31@
  HELI_HANDLER = 22@
  _rhino_driver = 24@
  _minigun_handler = 27@  
  to_targed_z = 13@
  _b = 14@
  camera_mode = 17@
  driver_state = 16@
  DRIVE_COMMAND = 7@
end
                                                                                                                                                                                   
if 0AAB: file_exists "models\txd\LD_BEAT.txd"                                                                                                                                                                                                                                   
then                                                                                                                                                                                                                
    0390: load_txd_dictionary 'LD_BEAT'                                                                                                                                                                             
    038F: load_texture "cring" as 1 // Load dictionary with 0390 first                                                                                                                                              
end                                                                                                                                                                                                                 
#MAVERICK.Load                                                                                                                                                                                                         
#FAM1.load                                                                                                                                                                                                       
#mp5lng.load                                                                                                                                                                                                        
038b:                                                                                                                                                                                                               

repeat                                                                                                                                                                                                                
repeat                                                                                                                                                                                                              
wait 0                                                                                                                                                                                                              
until if player.Defined(0)
077E: get_active_interior_to $ACTIVE_INTERIOR 
until if $ACTIVE_INTERIOR == 0       

    0208: 6@ = random_float_in_ranges 50.2 100.2                                                                                                                                                                                                                                              
    0208: 7@ = random_float_in_ranges 50.2 100.2                                                                                                                                                                                                                                                                                                                   
    04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 6@ 7@ 100.0                                                                                                           
    04D3: get_nearest_car_path_coords_from 0@ 1@ 2@ type 0 store_to 6@ 7@ 8@                                                                                                                 
    HELI_HANDLER = car.Create(#MAVERICK,6@,7@,8@)                                                                                                                                                               
    Car.Angle(HELI_HANDLER) = 184.7214                                                                                                                                                                                        
    Car.SetMaxSpeed(HELI_HANDLER, 253.0)                                                                                                                                                                                   
    Car.DoorStatus(HELI_HANDLER) = 1                                                                                                                                                                                          
    car.Health(HELI_HANDLER) = 20000
    Car.DoorStatus(HELI_HANDLER) = 5
    01EC: make_car HELI_HANDLER very_heavy 1 
    00AE: set_car HELI_HANDLER traffic_behaviour_to 2                                                                                                                                                                         
    Car.SetDriverBehaviour(HELI_HANDLER, drivetoplayer)                                                                                                                                                                       
    053F: set_car HELI_HANDLER tires_vulnerability 0                                                                                                                                                                          
    01EC: make_car HELI_HANDLER very_heavy 1                                                                                                                                                                                  
    Car.SetImmunities(HELI_HANDLER, 1, 1, 1, 1, 1)                                                                                                                                                                            
    0587: enable_car HELI_HANDLER validate_position 0
    
    039F: set_car HELI_HANDLER race_to 0@ 1@ 
    0825: set_helicopter HELI_HANDLER instant_rotor_start 
    
    
                                                                                                                                                                             
    _rhino_driver = Actor.CreateAsDriver(GANG2, #FAM1, HELI_HANDLER)                                                                                                                                                                   
    actor.SetImmunities(_rhino_driver, 1, 1, 1, 1, 1)        
    0619: enable_actor $player_actor collision_detection 0
    _minigun_handler = Object.Create(2985, 0.0, 0.0, -25.0)                                                                                                                                                                      
    Object.CollisionDetection(_minigun_handler) = False                                                                                                                                                                          
    0400: store_coords_to 0@ 1@ 2@ from_actor _minigun_handler with_offset 0.0 2.0 2.1                                                                                                                                           
    Object.PutAt(_minigun_handler, 0@ 1@ 2@)
    0681: attach_object _minigun_handler to_car HELI_HANDLER with_offset -1.2 -0.2 -0.6 rotation 0.0 0.0 0.0                                                                                                                                 
    06A7: put_actor $player_actor into_turret_on_car HELI_HANDLER at_car_offset 0.0 -1.5 1.0 position 1 shooting_angle -109.0 282.0 with_weapon 0                                                                                        
    0638: AS_actor $player_actor stay_put 1                                                                                                                                                                                   
    04F4: put_actor $player_actor into_turret_on_object _minigun_handler offset_from_object_origin -0.5 0.0 0.8 orientation 100 both_side_angle_limit 282.0 lock_weapon 0                                                                    
    077A: set_actor _rhino_driver acquaintance 4 to_actors_pedtype 0 // see ped.dat                                                                                                                                                                                                                                                                                                            
    077C: clear_actor $player_actor acquaintance 4 to_all_pedtypes // see ped.dat                                                                                                                                             
    072F: enable_car HELI_HANDLER stuck_check_distance 0.5 time 4000 and_restore_if stuck 1 flipped 1 unk_place_on_road_properly 1 to_path 7 // extended 03CC                                                                 
    0190: add_car HELI_HANDLER to_flipped_check // 6 max                                                                                                                                                                      
    Car.SetDriverBehaviour(HELI_HANDLER, followroad)                                                                                                                                                                                                                               
    if 056D:   actor _rhino_driver defined                                                                                                                                                                                                                                
    then                                                                                                                                                                                                            
        if not Actor.HasWeapon(_rhino_driver, 29)                                                                                                                                                                              
        then Actor.GiveWeaponAndAmmo(_rhino_driver, 29, 999999)                                                                                                                                                                
        end                                                                                                                                                                                                         
    end                                                                                                                                                                                                             


camera_mode = 0
driver_state = 0
DRIVE_COMMAND = 1
                                                                                                                                                                                             
:LOOP                                          
WHILE TRUE
    WAIT 0
    IF player.Defined(0)
    JF CONTINUE
    IF NOT ACTOR.Dead($PLAYER_ACTOR)
    JF CONTINUE
    if 056E:   car HELI_HANDLER defined                                                                                                                                                      
    then                                                                                                                                                                                                                                                                                                                                                                          
        if 8448:   not actor $PLAYER_ACTOR in_car HELI_HANDLER                                                                                                                                                               
        then                                                                                                                                                                                       
            if 01F4:   car HELI_HANDLER flipped                                                                                                                                                                      
            then                                                                                                                                                                                                    
                car.Angle(HELI_HANDLER) = 0.0                                                                                                                                                                                 
            end                                                                                                                                                                                                     
            068D: get_camera_position_to 26@ 25@ 23@
            068E: get_camera_target_point_to 10@ 20@ 2@
            050A: 1@ = distance_between_XYZ 26@ 25@ 23@ and_XYZ 10@ 20@ 2@                                                                                                                                          
            0087: to_targed_z = 2@ // (float)                                                                                                                                                                                
            0063: to_targed_z -= 23@ // (float)                                                                                                                                                                              
            0073: to_targed_z /= 1@ // (float) = sin                                                                                                                                                                         
            0087: _b = to_targed_z // (float)                                                                                                                                                                                
            0087: 30@ = to_targed_z // (float)                                                                                                                                                                               
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            to_targed_z /= 6.0                                                                                                                                                                                               
            005B: 30@ += to_targed_z // (float)                                                                                                                                                                              
            to_targed_z *= 6.0                                                                                                                                                                                               
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            to_targed_z *= 0.075                                                                                                                                                                                             
            005B: 30@ += to_targed_z // (float)                                                                                                                                                                              
            to_targed_z /= 0.075                                                                                                                                                                                             
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            006B: to_targed_z *= _b // (float)                                                                                                                                                                               
            to_targed_z *= 0.0446                                                                                                                                                                                            
            005B: 30@ += to_targed_z // (float)  arcsinX = X + (X^3)/6 + (X^5)*3/40 + (X^7)*15/336                                                                                                                           
            30@ *= -57.296 //                                                                                                                                                               
            30@ += 350.0                                                                                                                                                                                            
            0063: 10@ -= 26@ // (float)                                                                                                                                                                             
            0063: 20@ -= 25@ // (float)                                                                                                                                                                             
            0604: get_Z_angle_for_point 10@ 20@ store_to 11@  // 1  - x2-x1   2  - y2-y1                                                                                                            
            //-----------------------------------------------------------    X  Y                                                                                                           
            0174: 12@ = car HELI_HANDLER Z_angle                                                                                                                                                                              
            0063: 11@ -= 12@ // (float)                                                                                                                                                                             
            11@ += 270.0   //                                                                                                                                     
            02F6: 10@ = cosine 11@ // (float)                                                                                                                                                                  
            02F7: 20@ = sine 11@ // (float)                                                                                                                                                                  
            10@ *= -0.3                                                                                                                                                                                             
            20@ *= 0.4                                                                                                                                                                                              
            //-----------------------------------------------------------                                                                                                                         
            11@ -= 180.0                                                                                                                                                                                            
            if 30@ < 300.0                                                                                                                                                                                          
            then 30@ = 300.0                                                                                                                                                                                        
            end                                                                                                                                                                                                     
            if 30@ > 455.0                                                                                                                                                                                          
            then 30@ = 455.0                                                                                                                                                                                        
            end
            
            //if 11@ < 90.0 
            //then 11@ = 90.0 
            //end
            //if 11@ > 280.0
            ////then 11@ = 280.0
            //end
            
            //0090: $IMPORT_CAR_PRICE = float 30@ to_integer 

            //0513: show_text_box_1number 'SLOT_02' number $IMPORT_CAR_PRICE  // ~k~~VEHICLE_ENTER_EXIT~ Usar o Caa Nqueis $~1~
                                                                                                                                                                                                     
            if and                                                                                                                                                                                                  
            0471:   actor $player_actor near_object_in_rectangle _minigun_handler radius 2.0 2.0 sphere 0                                                                                                                                  
            03ca:   actor _minigun_handler defined                                                                                                                                                              
            then //0acd: "000" 100                                                                                                                                                                 
                0681: attach_object _minigun_handler to_car HELI_HANDLER with_offset -1.2 -0.2 -0.6 rotation 0.0 30@ 11@                                                                                                                     
                11@ = object.Angle(_minigun_handler)                                                                                                                                                                             
                11@ -= 94.0                                                                                                                                                                        
                actor.Angle($player_actor) = 11@
                if not Actor.Animation($player_actor) == "DRIVE_R_SLOW"
                THEN
                    0812: AS_actor $player_actor perform_animation "DRIVE_R_SLOW" "ped" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time 100                                                                                                                                            
                END
                0400: store_coords_to 10@ 20@ 2@ from_car _minigun_handler with_offset 100.0 0.0 0.0    
                0AB1: call_scm_func @HEALTH_13A 3 10@ 20@ 2@ 4@ 5@                                                                                                                                         
                03F0: enable_text_draw 0
                038D: draw_texture 1 position 4@ 5@ size 20.0 20.0 RGBA 128 0 0 255             
                //free aiming                                                                                                                                                                    
                if OR
                    00E1:   player 0 pressed_key 17
                    0AB0: 3@
                then                                                                             
                     
                        038D: draw_texture 1 position 4@ 5@ size 20.0 20.0 RGBA 0 150 0 255                                                                                                                                                         
                        0393: actor $player_actor perform_animation "DRIVE_R_SLOW" at 1.0 times_normal_rate                                                                  
                        0208: _random_1 = random_float_in_ranges -10.0 10.0                                                                                                                                               
                        0208: _random_2 = random_float_in_ranges -10.0 10.0                                                                                                           
                        0400: store_coords_to 26@ 25@ 18@ from_car _minigun_handler with_offset 0.8 0.0  1.1                                                                                                                     
                        0400: store_coords_to 10@ 20@ 23@ from_car _minigun_handler with_offset 800.0 _random_1 _random_2                                                                                                              
                        06BC: create_M4_shoot_from 26@ 25@ 18@ target 10@ 20@ 23@ energy 100                                                                                                                         
                        066E: create_particle "GUNFLASH" attached_to_object _minigun_handler with_offset 0.8 0.0  1.1 rotation  0.866024961519 0 0.500000766025 flag 1 handle_as 0@                                              
                        064C: make_particle 0@ visible                                                                                                                                                              
                        064F: remove_references_to_particle 0@                                                                                                                                                      
                        097B: play_audio_at_object _minigun_handler event 1157                                                                                                                                                   
                        0393: actor $player_actor perform_animation "DRIVE_R_SLOW" at 1.0 times_normal_rate                                                                                                                                                                                            
                                                                                                                                                           
                else 0393: actor $player_actor perform_animation "DRIVE_R_SLOW" at 0.0 times_normal_rate
                    if OR
                        00E1:   player 0 pressed_key 6
                        0AB0: 15@                                                                                                                                                               
                    then wait 50                                                                                                                                                                                    
                        if camera_mode == 1                                                                                                                                                                         
                        then camera_mode = 0
                            0ACA: "~Y~~H~commend tank drive camera" //1000                                                                                                                                                                               
                            06A7: put_actor $player_actor into_turret_on_car HELI_HANDLER at_car_offset 0.0 -1.5 1.0 position 1 shooting_angle 100.0 360.0 with_weapon 0                                                                                        
                            0638: AS_actor $player_actor stay_put 1                                                                                                                                                                                   
                            04F4: put_actor $player_actor into_turret_on_object _minigun_handler offset_from_object_origin -0.5 0.0 0.8 orientation 0 both_side_angle_limit 360.0 lock_weapon 0                     
                        else camera_mode = 1                                                                                                                                                                        
                            player.CanMove(0) = false
                            WAIT 30
                            player.CanMove(0) = TRUE
                            0ACA: "~Y~~H~commend tank stop camera" //1000                                                                                                                                                                    
                        end                                                                                                                                                                                         
                    else
                        if //OR
                            //00E1:   player 0 pressed_key 7
                            0AB0: 19@                                                                                                                                                               
                        then wait 50                                                                                                                                                                                    
                            if driver_state == 1                                                                                                                                                                         
                            then driver_state = 0
                                Car.SetMaxSpeed(HELI_HANDLER, 200.0)
                                Car.SetSpeedInstantly(HELI_HANDLER, 5.0)
                                0ACA: "~Y~~H~commend tank drive" //1000     
                            else driver_state = 1
                                0ACA: "~Y~~H~commend tank stop" //1000                                                                                                                                                                        
                            end
                        else
                            if //OR                                                                    
                                //00E1:   player 0 pressed_key 7                                       
                                0AB0: 29@                                                            
                            then wait 50
                                IF DRIVE_COMMAND == 1
                                THEN DRIVE_COMMAND = 2
                                ELSE 
                                    IF DRIVE_COMMAND == 2
                                    THEN DRIVE_COMMAND = 3
                                    ELSE 
                                        IF DRIVE_COMMAND == 3
                                        THEN DRIVE_COMMAND = 1
                                        END
                                    END
                                END
                                IF DRIVE_COMMAND == 1
                                THEN                                                      
                                    IF 0AB6: store_target_marker_coords_to 0@ 1@ 2@ // IF and SET
                                    THEN 0ACA: show_text_box "~Y~~H~ YOU SET DRIVE TO YOUR LOCATION" 
                                        04DF: set_heli HELI_HANDLER lean_and_thrust_limiter 0 
                                        0564: heli HELI_HANDLER simulate_crash_landing                                        
                                        07BB: set_heli HELI_HANDLER horizontal_thrust_power 10                                
                                        Car.SetMaxSpeed(HELI_HANDLER, 70.0)                                                   
                                        07BB: set_heli HELI_HANDLER horizontal_thrust_power 6                                 
                                        04A2: set_heli HELI_HANDLER fly_to 0@ 1@ 2@ altitude_between 70.0 and 70.0            
                                    else                                         
                                        0ACA: "YOU MUST SET DISTINATION ON MAP" //1000
                                    END                                   
                                ELSE 
                                    IF DRIVE_COMMAND == 2
                                    THEN
                                         Car.SetDriverBehaviour(HELI_HANDLER, followroad)
                                         0ACA: "~Y~~H~ YOU SET follow road" 
                                    ELSE
                                        IF DRIVE_COMMAND == 3
                                        THEN GOTO @SEARH_GANGSTERS
                                        END
                                    END
                                END
                            else
                                if OR
                                   00E1:   player 0 pressed_key 7
                                   0AB0: 15@                                                                                                                                                               
                                then wait 50
                                    0ACA: "~y~TARGED scan"
                                    const
                                    ACTOR_HANDLER = 9@
                                    end
                                    actor.StorePos($PLAYER_ACTOR, 10@, 20@, 23@)                                                                                                 
                                    if 0AE1: ACTOR_HANDLER = random_actor_near_point 10@ 20@ 23@ in_radius 500.0 find_next 1 pass_deads 0 //IF and SET                          
                                    jf continue                                                                                                                                  
                                    if 056D:   actor ACTOR_HANDLER defined                                                                                                      
                                    jf continue                                                                                                                                  
                                    repeat
                                    wait 0                                                                                          
                                    if not car.Wrecked(HELI_HANDLER)                                                                
                                    jf continue                                                                                     
                                    IF 00E1:   player 0 pressed_key 7                                                                              
                                    THEN wait 50                                                                           
                                        BREAK                                                                                       
                                    END                                                                                             
                                    if 056D:   actor ACTOR_HANDLER defined                                                         
                                    then 0ACD: "FIRING" 100                                                                         
                                        GOSUB @MINIGUN_FIRE                                                                         
                                    else 0ACA: "NOT FUND TARGED"                                                                    
                                        break                                                                                       
                                    end                                                                                                                                                                  
                                    until if actor.Dead(ACTOR_HANDLER)                                                             
                                    0ACA: "~r~TARGED deceased"
                                else                                                                      
                                    if driver_state == 1
                                    then
                                        Car.SetMaxSpeed(HELI_HANDLER, 0.0)
                                        Car.SetSpeedInstantly(HELI_HANDLER, 0.0)
                                    end
                                END
                            end
                        end
                    end                                                                                                                                                                                         
                end
            end                                                                                                                                                                                                     
        end
        if or                                                                                                                                                                                                       
            ACTOR.Dead($player_actor)                                                                                                                           
            car.Wrecked(HELI_HANDLER)
            0AB0: 21@                                                                                                                                                                                         
        then  
            goto @clean                                                                                                                                                                                      
        end                                                                                                                                                                                                         
    end                                                                                                                                                                                                            
end
END_THREAD


:MINIGUN_FIRE
for 32@ = 0 to 0 step 1
    IF _minigun_handler > 0
    JF CONTINUE
    if not car.Wrecked(HELI_HANDLER)
    jf continue
    if 03ca:   actor _minigun_handler defined                                                                                                                                                             
    then                                                                                                                                                                                                     
        object.StorePos(_minigun_handler, 26@, 25@, 23@)                                                                                                                                                                  
    end
    if 056D:   actor ACTOR_HANDLER defined
    then                                                                                                                                                                                                                                                                                                                           
       actor.StorePos(ACTOR_HANDLER, 10@, 20@, 2@)
    end                                                                                                                                                              
    050A: 1@ = distance_between_XYZ 26@ 25@ 23@ and_XYZ 10@ 20@ 2@                                                                                                                                                                             
    0087: to_targed_z = 2@ // (float)                                                                                                                                                                                 
    0063: to_targed_z -= 23@ // (float)                                                                                                                                                                               
    0073: to_targed_z /= 1@ // (float) = sin                                                                                                                                                                          
    0087: _b = to_targed_z // (float)                                                                                                                                                                                 
    0087: 30@ = to_targed_z // (float)                                                                                                                                                                                
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    to_targed_z /= 6.0                                                                                                                                                                                                
    005B: 30@ += to_targed_z // (float)                                                                                                                                                                               
    to_targed_z *= 6.0                                                                                                                                                                                                
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    to_targed_z *= 0.075                                                                                                                                                                                              
    005B: 30@ += to_targed_z // (float)                                                                                                                                                                               
    to_targed_z /= 0.075                                                                                                                                                                                              
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    006B: to_targed_z *= _b // (float)                                                                                                                                                                                
    to_targed_z *= 0.0446                                                                                                                                                                                             
    005B: 30@ += to_targed_z // (float)  arcsinX = X + (X^3)/6 + (X^5)*3/40 + (X^7)*15/336                                                                                                                            
    30@ *= -57.296 //                                                                                                                                                                
    30@ += 354.200                                                                                                                                                                                           
    0063: 10@ -= 26@ // (float)                                                                                                                                                                              
    0063: 20@ -= 25@ // (float)                                                                                                                                                                              
    0604: get_Z_angle_for_point 10@ 20@ store_to 11@  // 1  - x2-x1   2  - y2-y1                                                                                                             
    //-----------------------------------------------------------    X  Y                                                                                                            
    0174: 12@ = car HELI_HANDLER Z_angle                                                                                                                                                                               
    0063: 11@ -= 12@ // (float)                                                                                                                                                                              
    11@ += 270.0   //                                                                                                                                      
    02F6: 10@ = cosine 11@ // (float)                                                                                                                                                                   
    02F7: 20@ = sine 11@ // (float)                                                                                                                                                                   
    10@ *= -0.3                                                                                                                                                                                              
    20@ *= 0.4                                                                                                                                                                                               
    //-----------------------------------------------------------                                                                                                                          
    11@ -= 180.0                                                                                                                                                                                             
    if 30@ < 320.0                                                                                                                                                                                           
    then 30@ = 320.0                                                                                                                                                                                         
    end                                                                                                                                                                                                      
    if 30@ > 395.0                                                                                                                                                                                           
    then 30@ = 395.0                                                                                                                                                                                         
    end
    if 11@ < 90.0 
    then 11@ = 90.0 
    end
    if 11@ > 280.0
    then 11@ = 280.0
    end
    if 03ca:   actor _minigun_handler defined                                                                                                                                                                                
    then //0acd: "000" 100                                                                                                                                                                                   
        04C4: store_coords_to 10@ 20@ 2@ from_car ACTOR_HANDLER with_offset 0.0 0.0  0.0                                                                                                                    
        0AB1: call_scm_func @HEALTH_13A 3 10@ 20@ 2@ 4@ 5@  //celownik                                                                                                                                             
        03F0: enable_text_draw 0                                                                                                                                                                             
        038D: draw_texture 1 position 4@ 5@ size 30.0 30.0 RGBA 128 128 0 255
        0681: attach_object _minigun_handler to_car HELI_HANDLER with_offset -1.2 -0.2 -0.6 rotation 0.0 30@ 11@
        11@ = object.Angle(_minigun_handler)                                                                                                                                                                             
        11@ -= 94.0                                                                                                                                                                        
        actor.Angle($player_actor) = 11@
        if not Actor.Animation($player_actor) == "DRIVE_R_SLOW"
        THEN
            0812: AS_actor $player_actor perform_animation "DRIVE_R_SLOW" "ped" framedelta 4.0 loop 1 lockX 0 lockY 0 lockF 0 time 100                                                                                                                                                      
        END
    end                                                                                                                                                                                                      
        0393: actor $player_actor perform_animation "DRIVE_R_SLOW" at 1.0 times_normal_rate                                                                                                                                                                                                                                                                                                                                                                               
        0208: _random_1 = random_float_in_ranges -1.0 1.0                                                                                                                                                          
        0400: store_coords_to 26@ 25@ 18@ from_car _minigun_handler with_offset 0.8 0.0  1.1                                                                                                                             
        04C4: store_coords_to 10@ 20@ 2@ from_car ACTOR_HANDLER with_offset _random_1 0.0 _random_1                                                                                                                                
        06BC: create_M4_shoot_from 26@ 25@ 18@ target 10@ 20@ 2@ energy 150                                                                                                                               
        066E: create_particle "GUNFLASH" attached_to_object _minigun_handler with_offset 0.9 0.0  1.5 rotation  0.866024961519 0 0.500000766025 flag 1 handle 0@                                                          
        064C: make_particle 0@ visible                                                                                                                                                                       
        064F: remove_references_to_particle 0@                                                                                                                                                                
        097B: play_audio_at_object _minigun_handler event 1157                                                                                                                                                            
                                                                                                                                                                                                          
    
END                                                                                                                                                                                                      
RETURN
END_THREAD
0000:

:SEARH_GANGSTERS
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
if 0AE1: 8@ = random_actor_near_point 0@ 1@ 2@ in_radius 200.0 find_next 1 pass_deads 0 //IF and SET 
then
    IF 056D:   actor 8@ defined 
    JF @LOOP
    089F: get_actor 8@ pedtype_to 9@ 
    if or                                                                                          
        9@ == 7                                                                                   
        9@ == 9                                                                                   
        9@ == 10                                                                                  
        9@ == 11                                                                                  
        9@ == 12                                                                                  
        9@ == 13                                                                                  
        9@ == 14                                                                                  
    then                                                                                           
        if not Actor.Dead(8@)                                                                    
        then                                                                                       
            04C4: store_coords_to 26@ 25@ 18@ from_actor 8@ with_offset 4.0 4.0 0.0               
            if not Car.Wrecked(HELI_HANDLER)                                                                
            then                                                                                   
                04DF: set_heli HELI_HANDLER lean_and_thrust_limiter 0 
                0564: heli HELI_HANDLER simulate_crash_landing                                                                
                07BB: set_heli HELI_HANDLER horizontal_thrust_power 10                                                        
                Car.SetMaxSpeed(HELI_HANDLER, 30.0)                                                                           
                07BB: set_heli HELI_HANDLER horizontal_thrust_power 6                                                         
                04A2: set_heli HELI_HANDLER fly_to 26@ 25@ 18@ altitude_between 60.0 and 60.0                                                                                   
                0ACA: show_text_box "~R~~H~DRIVE TO RANDOM GANGSTER"                           
            end                                                                                    
        end                                                                                        
    end                                                                                            
end
goto @loop

:clean
IF NOT ACTOR.Dead($PLAYER_ACTOR)
THEN 
    0465: remove_actor $PLAYER_ACTOR from_turret_mode
    0619: enable_actor $player_actor collision_detection 1
    0638: AS_actor $player_actor stay_put 0
END 
car.RemoveReferences(HELI_HANDLER)                                                                                                                                                                           
Actor.RemoveReferences(_rhino_driver)                                                                                                                                                                         
object.RemoveReferences(_minigun_handler)                                                                                                                                                                                
END_THREAD

:HEALTH_13A
18@ = 1 
0A9F: 19@ = current_thread_pointer 
0AB1: call_scm_func @HEALTH_1DF 2 19@ 0 14@  
0AB1: call_scm_func @HEALTH_1DF 2 19@ 3 15@  
0AB1: call_scm_func @HEALTH_1DF 2 19@ 6 16@  
0AB1: call_scm_func @HEALTH_1DF 2 19@ 9 17@  
0AB1: call_scm_func @HEALTH_1DF 2 19@ 12 18@  
0AA5: call 7392816 num_params 6 pop 6 18@ 18@ 17@ 16@ 15@ 14@  
0AB1: call_scm_func @HEALTH_24B 2 3@ 4@ 3@ 4@  
0AB2: ret 2 3@ 4@ 

:HEALTH_1DF
if 
   not 0@ == 0 
jf @HEALTH_23C 
1@ *= 4 
0A8E: 2@ = 0@ + 220 // int 
if 
  2@ == 1 
jf @HEALTH_226 
1@ += 10783072 
jump @HEALTH_235 

:HEALTH_226
005A: 1@ += 0@ // (int) 
1@ += 60 

:HEALTH_235
jump @HEALTH_243 

:HEALTH_23C
1@ = 0 

:HEALTH_243
0AB2: ret 1 1@ 

:HEALTH_24B
2@ = 640.0 
0A8D: 4@ = read_memory 12677188 size 4 virtual_protect 0 
0093: 4@ = integer 4@ to_float 
0073: 2@ /= 4@ // (float) 
006B: 0@ *= 2@ // (float) 
3@ = 448.0 
0A8D: 5@ = read_memory 12677192 size 4 virtual_protect 0 
0093: 5@ = integer 5@ to_float 
0073: 3@ /= 5@ // (float) 
006B: 1@ *= 3@ // (float) 
0AB2: ret 2 0@ 1@            

























     




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                                                                                                                 
                                                               
        
        //_____________________________________________________________                                                                                 
                                                                                                                                                    
    



























